# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: <clu>
# Contributor: Jose San Juan <sanjuan@tng.iac.es>

pkgname=ccfits
pkgver=2.6
pkgrel=2
pkgdesc="Object Oriented Interface to the CFITSIO Library"
arch=('loong64' 'x86_64')
url="https://heasarc.gsfc.nasa.gov/docs/software/fitsio/ccfits/"
license=('custom')
depends=('cfitsio')
source=(https://heasarc.gsfc.nasa.gov/docs/software/fitsio/${pkgname}/CCfits-${pkgver}.tar.gz)
sha256sums=('2bb439db67e537d0671166ad4d522290859e8e56c2f495c76faa97bc91b28612')

build() {
  cd "${srcdir}"/CCfits-$pkgver

  ./configure --with-cfitsio-libdir=/usr/lib --prefix=/usr
  make
}

package() {
  cd "${srcdir}"/CCfits-$pkgver

  make DESTDIR="${pkgdir}" install

#install license
  install -Dm644 License.txt "${pkgdir}/usr/share/licenses/$pkgname/License.txt"
}
